home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Comms & Internet / LinkConverter 1.1.2 / Dialog Director v0.7 / Examples / Gauge (Live).as < prev    next >
Encoding:
Text File  |  1998-01-12  |  1.2 KB  |  33 lines  |  [TEXT/ToyS]

  1. property theIters : [20, 40, 60, 80, 100, 120, 140, 160]
  2. property theDialog : {style:movable dialog, name:"Gauge", size:[300, 125], contents:[¬
  3.     {class:push button, bounds:[10, 95, 90, 115], name:"Forward"}, ¬
  4.     {class:push button, bounds:[110, 95, 190, 115], name:"Backward"}, ¬
  5.     {class:push button, bounds:[210, 95, 290, 115], name:"Done"}, ¬
  6.     {class:pop up, bounds:[10 - 4, 50, 150, 50 + 20], name:"Iterations:", value:3, contents:theIters}, ¬
  7.     {class:gauge, bounds:[10, 10, 290, 10 + 12], value:0, max value:100}, ¬
  8.     {class:gauge, bounds:[10, 30, 290, 30 + 12], value:0, max value:-1} ¬
  9.         ], default item:3}
  10.  
  11. --tell application "FileMaker Pro"
  12. activate
  13. dd install with fonts {name:"Geneva", size:10} with grayscale
  14. set dlog to dd make dialog theDialog
  15.  
  16. repeat
  17.     set i to dd interact with user --for max ticks 60
  18.     if i = 3 then exit repeat
  19.     if i = 1 then
  20.         set maxVal to item (dd get value of item 4 of dlog) of theIters
  21.         repeat with x from 1 to maxVal
  22.             dd set value of items 5 thru 6 of dlog to [x, x]
  23.         end repeat
  24.     else if i = 2 then
  25.         set maxVal to item (dd get value of item 4 of dlog) of theIters
  26.         repeat with x from maxVal to 0 by -1
  27.             dd set value of items 5 thru 6 of dlog to [x, x]
  28.         end repeat
  29.     end if
  30. end repeat
  31. dd delete dlog
  32. dd uninstall
  33. --end tell